import request from '@/utils/request'

const _Api = {
  
  Login: '/web/login',       // 用户登录
  GetPicCode: '/web/getPicCode',       // 获取图形验证码
  Detail: '/web/user/detail',       // 用户详情
  Logout: '/web/user/logout',       // 注销

  SmsBalanceLogList: '/web/smsBalanceLog/list',       // 短信余额充值记录
  SmsList: '/web/sms/list',       // 短信发送记录
  
  
  MsgStatistics: '/web/statistics/msg',       // 统计 - 短信发送情况


  MsgSend: '/web/sms/send',       // 统计 - 短信发送情况



  QNupToken: '/web/qn/upToken',       // 统计 - 短信发送情况
  PlatformTemplateList: '/web/platformTemplate/list',       // 统计 - 短信发送情况

  
  wangYiSend: '/wangYi/sms/send',   //   参数:to
  wangYiList: '/wangYi/sms/list',   //   参数:to 
}

/**
 * login func
 * parameter: {
 *     username: '',
 *     password: '',
 *     remember_me: true,
 *     captcha: '12345'
 * }
 * @param parameter
 * @returns {*}
 */
export function login (parameter) {
  return request({
    url: _Api.Login,
    method: 'post',
    data: parameter,
  })
}
export function logout (parameter) {
  return request({
    url: _Api.Logout,
    method: 'post',
    data: parameter,
  })
}
export function getPicCode (parameter) {
  return request({
    url: _Api.GetPicCode,
    method: 'post',
    data: parameter,
  })
}
export function getInfo (parameter) {
  return request({
    url: _Api.Detail,
    method: 'post',
    data: parameter,
  })
}
export function getSmsBalanceLogList (parameter) {
  return request({
    url: _Api.SmsBalanceLogList,
    method: 'post',
    data: parameter,
  })
}
export function getSmsList (parameter) {
  return request({
    url: _Api.SmsList,
    method: 'post',
    data: parameter,
  })
}
export function getMsgStatistics (parameter) {
  return request({
    url: _Api.MsgStatistics,
    method: 'post',
    data: parameter,
  })
}
export function getMsgSend (parameter) {
  return request({
    url: _Api.MsgSend,
    method: 'post',
    data: parameter,
  })
}

export function getQNupToken (parameter) {
  return request({
    url: _Api.QNupToken,
    method: 'post',
    data: parameter,
  })
}

export function getPlatformTemplateList (parameter) {
  return request({
    url: _Api.PlatformTemplateList,
    method: 'post',
    data: parameter,
  })
}

// 测试
export function wangYiSend (parameter) {
  return request({
    url: _Api.wangYiSend,
    method: 'post',
    data: parameter,
  })
}
export function wangYiList (parameter) {
  return request({
    url: _Api.wangYiList,
    method: 'post',
    data: parameter,
  })
}



